package com.glory.dgcpcpda.adapter;

import android.content.Context;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.dgcpcpda.R;
import com.glory.dgcpcpda.entity.QCformEntity;

import java.util.List;

public class ItemSpcLinesAdapter extends BaseQuickAdapter<QCformEntity.QCFORMINFO.SPCLINESINFO, BaseViewHolder> {

    private Context context;

    public ItemSpcLinesAdapter(@Nullable List<QCformEntity.QCFORMINFO.SPCLINESINFO> data, Context context) {
        super(R.layout.item_spc_lines, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, QCformEntity.QCFORMINFO.SPCLINESINFO item) {
        helper.setText(R.id.tvEdcItemName,item.getEDCITEMNAME());
        helper.setText(R.id.tvEdcItemDesc,item.getEDCITEMDESC());
        helper.setText(R.id.tvSl,item.getUSL()+"/"+item.getSL()+"/"+item.getLSL());
        helper.setText(R.id.tvCollectType,item.getCOLLECTTYPE());
        helper.addOnClickListener(R.id.tvSpc);
    }
}
